Catchable fatal error: Object of class view_user could not be converted to string in C:\xampp\xampp\htdocs\textile\admin\view_class.php on line 9 [closed]

Posted by user1282142 on Stack Overflow See other posts from Stack Overflow or by user1282142
Published on 2012-03-20T23:18:09Z Indexed on 2012/03/20 23:30 UTC
Read the original article Hit count: 245

Filed under:
<?php

include('config.inc');

class view_user
{
    function view($user)
    {
        $temp = mysql_query("SELECT * from register_user where user_name = '$user'");
        $value = mysql_fetch_array($temp);

        $query = mysql_query("SELECT order_user.design_name, order_user.reaad, order_user.pick, order_user.yarn_detail
        FROM register_user
        INNER JOIN order_user
        ON register_user.register_id = '$value[register_id]' and order_user.register_id = $value[register_id]");
        if($query)
        {
            echo "<center><table border = 1>
            <tr>
            <th>Design Name</th>
            <th>Read</th>
            <th>Pick</th>
            <th>Design Detail</th>
            </tr>";

            while($row = mysql_fetch_array($query))
            {
                echo "<tr>";
                echo "<td>$row[design_name]</td>";
                echo "<td>$row[reaad]</td>";
                echo "<td>$row[pick]</td>";
                echo "<td>$row[yarn_detail]</td>";
                echo"</tr></center>";
            }   

        }
        else
        {
            echo"User doesn't Exist";
            include('footer1.php');
        }
    }
}

?>

© Stack Overflow or respective owner